package com.newegg.app.qec.util;

import android.app.Application;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

/**
 * Created by Allen on 2017/12/19.
 */
public class MyApplication extends Application{
    public static OkHttpClient okHttpClient;
    @Override
    public void onCreate() {
        super.onCreate();
        okHttpClient =  new OkHttpClient.Builder()
                .readTimeout(60, TimeUnit.SECONDS)//设置读取超时时间
                .writeTimeout(60, TimeUnit.SECONDS)//设置写的超时时间
                .connectTimeout(60, TimeUnit.SECONDS)//设置连接超时时间
                .build();
    }
}
